package com.babymall.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.babymall.model.Admin;
import com.babymall.service.IAdminService;

@Controller
@RequestMapping("/admin")
public class AdminController {

	@Resource
	private IAdminService adminService;
	
	@RequestMapping("/login.do")
	public String login(Admin admin) {
		
		Admin a = adminService.login(admin);
		if(a!=null) {
			return "success";
		}else {
			return "error";
		}
		
				
	}
	
}
